<template>
  <div>
    <h2>v-bind动态绑定属性</h2>
    <p title="我是title属性">哈哈哈</p>
    <p v-bind:title="msg">我是一个动态属性</p>
    <p v-bind:class="box">我是样式</p>
    <!-- 简写 v-bind  : -->
    <p :class="box" class="aa">哈哈哈</p>
    <div :style="{'fontSize':'40px','backgroundColor': 'pink',}">style</div>
  </div>
</template>

<script>
export default {
    data(){
        return {
            msg:'我是title属性',
            box:'active'
        }
    }
};
</script>

<style>
.active{
    color: red;
}
.aa{
    font-size: 40px;
}
</style>